package 结构型模式.适配器;

/**
 * @ClassNameObjectAdapterTest
 * @Description
 * @Author
 * @Date2021/12/14 17:28
 **/
public class ObjectAdapterTest {
    public static void main(String[] args) {
        ObjectAdapter objectAdapter = new ObjectAdapter(new Adaptee());
        objectAdapter.request();

    }
}

class ObjectAdapter implements Target {
    private Adaptee adaptee;

    @Override
    public void request() {
        adaptee.specialRequest();
    }

    public ObjectAdapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }
}
